<template>
  <div class="module">
    <h3 class="title">
      <slot name="title"></slot>
      <span @click="delModule">
        <i
          class="el-icon-delete"
          style="cursor: pointer;"
        >
        </i>
      </span>
    </h3>

    <el-input
      type="textarea"
      placeholder="请输入内容"
      v-model="textarea"
      maxlength="300"
      show-word-limit
      v-if="isInput"
    >
    </el-input>
    <el-dialog
      v-else
      :visible.sync="showDialog"
    >
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: '',
  props: {
    isInput: {
      type: Boolean,
      default: true
    },
    allModule: {
      type: Array,
      required: true
    }
  },
  data () {
    return {
      /* 弹出框显示状态 */
      showDialog: false,
      textarea: ''
    }
  },
  components: {},
  computed: {},
  watch: {},
  created () {},
  mounted () {},
  methods: {
    delModule () {
      this.$emit('delModule')
    }
  }
}
</script>

<style lang="scss" scoped>
.title {
  color: #12141a;
  font-family: PingFangSC-Semibold, PingFang SC;
  font-size: 20px;
  font-weight: 600;
  line-height: 33px;
  margin-bottom: 16px;
}
::v-deep .el-textarea .el-input__count {
  color: #909399;
  background-color: unset;
  position: absolute;
  font-size: 12px;
  bottom: 5px;
  right: 375px;
}
::v-deep .el-icon-delete {
  margin-left: 700px;
}
</style>
